﻿#nullable enable

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace PHMEE.EnergyEfficiency;

public interface ILogAbstractAppService
{
    /// <summary>
    /// 获取该船舶使用的油品
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<List<FuelType>> GetFuelTypesAsync(Guid vesselId);
    
    /// <summary>
    /// 检查航海日志 Log abstract 的时间戳是否已经存在
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="dateUTC"></param>
    /// <param name="timeUTC"></param>
    /// <returns></returns>
    Task<CheckTsExistDto> CheckTsExistAsync(Guid vesselId, DateOnly dateUTC,
        TimeOnly timeUTC);
    
    /// <summary>
    /// 获取创建 log abstract 的 DTO
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="dateUTC"></param>
    /// <param name="timeUTC"></param>
    /// <returns></returns>
    Task<LogAbstractDto> GetCreateLogAbstractDtoAsync(Guid vesselId, DateOnly dateUTC, TimeOnly timeUTC);
    
    /// <summary>
    /// 录入航海日志 Log abstract
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    Task CreateAsync(Guid vesselId, LogAbstractDto input);

    /// <summary>
    /// 删除航海日志 Log abstract
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="ts"></param>
    Task DeleteAsync(Guid vesselId, DateTime ts);

    /// <summary>
    /// 更新航海日志 Log abstract
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    Task UpdateAsync(Guid vesselId, LogAbstractDto input);

    /// <summary>
    /// 分页查询航海日志 Log abstract
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<PagedResultDto<LogAbstractDto>> GetListAsync(Guid vesselId, PagedAndSortedWithTimeRangeResultRequestDto input);

    /// <summary>
    /// 根据输入的字符串匹配港口列表
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<List<OVDPortDto>> GetPortsAsync(string input);
}